package routers

import (
	"github.com/astaxie/beego"
	"lazyops_go/logControllers"
)

func init() {

	//找到路由后执行controller 之前
	beego.InsertFilter("/log/*", beego.BeforeExec, PermsFilter)

	//用户日志
	beego.Router("/log/user/", &logControllers.LogController{}, "get:IndexUserLog")
	beego.Router("/log/user/:page/", &logControllers.LogController{}, "get:IndexUserLog")
	beego.Router("/log/searchlgu/:key/", &logControllers.LogController{}, "get:SearchUserLog")
	//任务日志
	beego.Router("/log/task/", &logControllers.LogController{}, "get:IndexTaskLog")
	beego.Router("/log/task/:page/", &logControllers.LogController{}, "get:IndexTaskLog")
	beego.Router("/log/searchtk/:key/", &logControllers.LogController{}, "get:SearchTaskLog")
	beego.Router("/log/taskret/", &logControllers.LogController{}, "post:TaskLogRet")

}
